<template>
<div>
    <div>姓：<input type="text" v-model="surname"></div>
    <div>名：<input type="text" v-model="name"></div>
    <div>姓名：<text v-text="fullName"/></div>
</div>
</template>

<script>
export default {
computed:{
    fullName(){
        return this.surname+'~'+this.name
    }
},
data(){
    return{
        surname:'勇敢',
        name:'小陈',
    }
}
}
</script>

<style>

</style>